#pragma once

template<typename T>
class Singleton
{
	Singleton(const Singleton&) = delete;
	const Singleton& operator=(const Singleton&) = delete;
protected:
	static T* pInst;
public:
	Singleton() {}
	~Singleton() {}

	static T* instance()
	{
		if (!pInst)
			pInst = new T;

		return pInst;
	}

	static T& getMe() { return *instance(); }
	static void delMe() { delete pInst; }
};
template<typename T>
T* Singleton<T>::pInst = NULL;